<?php
namespace Portal\Model;
use Think\Model;
class StoreModel extends Model {
    public function insertStoreInfo($data){
        if(!$data){
            return false;
        }
        $res = M('store')->add($data);
        return $res;
    }

    public function getStoreInfo($cond){
        if(!$cond){
            return false;
        }
        $res = M('store')->join('ecm_member on ecm_store.store_id = ecm_member.user_id')
            ->where($cond)
            ->find();
        return $res;
    }

    public function reviseStoreInfo($cond,$data){
        if(!$cond|| !$data){
            return false;
        }
        $res = M('store')->where($cond)->save($data);
        return $res;
    }
}